const state = {

    menuList: [],                       // 所有的菜单

    currentModel: 'home',               // 当前进入的模式   【home， homevip,  datavhome,  phonehome】为了刷新需要的菜单


}

const mutations = {
    setMenuList(state, list) {
        state.menuList = list
    }
}

const actions = {

}

const getters = {
    currrentMenuList(state) {
        return state.menuList.length?[state.menuList.find(item => item.name == state.currentModel)]:[]
    }
}

export default {
    namespaced: true,
    actions,
    state,
    mutations,
    getters,
}